package com.springboot.astra.service.serviceImpl;

import com.springboot.astra.bean.Permission;
import com.springboot.astra.mapper.PermissionMapper;
import com.springboot.astra.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class PermissionServiceImpl implements PermissionService {
    @Autowired
    PermissionMapper permissionMapper;
    @Override
    public Permission getOneById(Integer id) {
        return permissionMapper.getOneById(id);
    }

    @Override
    public List<Permission> getAll() {
        return permissionMapper.getAll();
    }

    @Override
    public void insertPermission(Permission permission) {
        permissionMapper.insertPermission(permission);
    }

    @Override
    public void updateOneById(Permission permission) {
        permissionMapper.updateOneById(permission);
    }

    @Override
    public void deleteOneById(Integer id) {
        permissionMapper.deleteOneById(id);
    }
}
